package collection;

import string.Point;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionDemo2 {
    public static void main(String[] args) {
        Point p1 = new Point(200, 300);
        Point p2 = new Point(200, 300);
        Point p3 = new Point(200, 300);
        System.out.println(p1.equals(p2));
        Collection coll = new ArrayList();
        coll.add(p1);
        coll.add(p2);
        coll.add(p3);
        boolean result = coll.contains(p2);
        System.out.println(result);

        Point p4 = new Point(500, 300);
        System.out.println(coll.contains(p4));
        boolean result2 = p1.equals(p2);
        System.out.println(result2);
        Point p5 = new Point(500, 300);
        System.out.println(coll.contains(p5));





    }
}
